var buttonVolver = [{
	ui: 'confirm',
	text: 'Volver',
	handler: function()
		{
			window.open("crearDoc2.html","_self");
		}
	}]

var dockedItems = [{
	xtype: 'toolbar',
	title: 'Buscar Cliente',
	dock: 'top',
	ui: 'dark',
	items: buttonVolver
}]

var bodyCliente = [{
	xtype: 'fieldset',
		defaults: 
		{
			labelAlign: 'left',
			labelWidth: '30%'
		},
	items: [{
		xtype: 'textfield',
		label: 'RUC'	
	},
	{
		xtype: 'textfield',
		label: 'Razon Social'
	}]
}]

var btnBuscar = [{
	xtype: 'panel',
    layout: {
        type: 'vbox',
        align: 'center',
        pack: 'center'
    },
    items: [
        {
		xtype: 'button',
		text: 'Buscar',
		cls: 'btnBuscaCliente'
		}
	]
}]

var lstCliente =

'<div>'+
'<label for="idClientes"></label>'+
'<select name="idClientes" id="idClientes">'+
'</select>'+
'</div>';

var items = [{
	xtype: 'fieldset',
		defaults:
		{
			labelAlign: 'left',
			labelWidth: '30%'
		},
	items: bodyCliente
	},
	{
	items: btnBuscar
	},
	{
	html: lstCliente
	}]

buscaClienteView = Ext.extend(Ext.Panel, 
{
	fullscreen: true,
	layout: 'card',
		
	initComponent: function() 
	{
		this.crearDocPanel = new Ext.Panel(
        {
			dockedItems: dockedItems,
			
			items: items
			
		});		
        
        this.items = this.crearDocPanel;
        buscaClienteView.superclass.initComponent.call(this);
	}
});

Ext.reg('buscaClienteView', buscaClienteView);